This repository was archived by the owner on Apr 14, 2019. It is now read-only.
Add support for HTML::Lint::Pluggable#35
Open
swelljoe wants to merge 1 commit intopetdance:masterfrom
Open
Conversation
Test::HTML::Lint currently only supports a $lint object reference of type HTML::Lint, which prevents use of HTML::Lint::Pluggable modules in tests. I needed HTML5 support, so I did some digging, and found why it didn't work. This change allows tests using the HTML4 validator to continue to work, as before, but now makes it possible to add new validators via the pluggable interface.
Using it looks exactly the same, except for setting up the $lint object:
use HTML::Lint::Pluggable;
my $lint = new HTML::Lint::Pluggable;
$lint->load_plugins(qw/HTML5/);
html_ok( $lint, $content, "HTML validation");
Owner
|
I've never seen HTML::Lint::Pluggable before. I'll have to take a look at it. |
Owner
|
Is this still something you'd like to see supported? |
Author
|
Sure. As far as I recall, it just needs this patch merged to make it work. I believe it was backward compatible (tests worked). It's been a while since I poked at it. So, I think it is easy (merge the patch), and I think it is safe (it won't break existing use cases). I used the patched version for a while without incident, and will probably come back to it eventually. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test::HTML::Lint currently only supports a $lint object reference of type HTML::Lint, which prevents use of HTML::Lint::Pluggable modules in tests. I needed HTML5 support, so I did some digging, and found why it didn't work. This change allows tests using the HTML4 validator to continue to work, as before, but now makes it possible to add new validators via the pluggable interface.
Using it looks exactly the same, except for setting up the $lint object: